Change in openvpn[master]: ssl_openssl: Use correct return type for RSA_size
A message that is not in the archive (sent off-list or not yet received): gerrit.1769512571000.Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email
to review the following change.
Change subject: ssl_openssl: Use correct return type for RSA_size
......................................................................
ssl_openssl: Use correct return type for RSA_size
It returns int, so use that. Avoids a sign-compare warning.
---
M src/openvpn/ssl_openssl.c
1 file changed, 2 insertions(+), 12 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/93/1493/1
src/openvpn/ssl_openssl.c +2 -12
@@ -1491,17 +1491,11 @@return len; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif -/* sign arbitrary data */ static int rsa_priv_enc (int flen,const unsigned char *from,unsigned char *to,RSA *rsa,int padding) { -unsigned int len =RSA_size (rsa); -int ret =-1 ; +int len =RSA_size (rsa);if (padding !=RSA_PKCS1_PADDING && padding !=RSA_NO_PADDING ) {
@@ -1509,15 +1503,11 @@return -1 ; } - ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding)); +int ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding));return (ret == len) ? ret :-1 ; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif -static int tls_ctx_use_external_rsa_key (struct tls_root_ctx *ctx,EVP_PKEY *pkey) {
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Attention is currently required from: flichtenheld.
plaisthos has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email )
Change subject: ssl_openssl: Use correct return type for RSA_size
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Mon, 02 Mar 2026 15:35:22 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: flichtenheld.
cron2 has posted comments on this change by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email )
Change subject: ssl_openssl: Use correct return type for RSA_size
......................................................................
Patch Set 5: Code-Review+2
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 5
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Wed, 04 Mar 2026 14:40:14 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
PATCH v5 1/1 ssl_openssl: Use correct return type for RSA_size
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
It returns int, so use that. Avoids a sign-compare warning.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493
This mail reflects revision 5 of this Change.
Acked-by according to Gerrit (reflected above):
Arne Schwabe <[email protected]...>
Gert Doering <[email protected]...>
src/openvpn/ssl_openssl.c +2 -12
@@ -1491,17 +1491,11 @@return len; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif -/* sign arbitrary data */ static int rsa_priv_enc (int flen,const unsigned char *from,unsigned char *to,RSA *rsa,int padding) { -unsigned int len =RSA_size (rsa); -int ret =-1 ; +int len =RSA_size (rsa);if (padding !=RSA_PKCS1_PADDING && padding !=RSA_NO_PADDING ) {
@@ -1509,15 +1503,11 @@return -1 ; } - ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding)); +int ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding));return (ret == len) ? ret :-1 ; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif -static int tls_ctx_use_external_rsa_key (struct tls_root_ctx *ctx,EVP_PKEY *pkey) {
[Openvpn-devel] [PATCH applied] Re: ssl_openssl: Use correct return type for RSA_size
Trivially correct ;-) - and easier-to-understand logic while at it.
Your patch has been applied to the master branch.
commit 8289589a5afd63def246a5e1e7b87f12c4c2f15a
Author: Frank Lichtenheld Date: Wed Mar 4 15:40:21 2026 +0100
ssl_openssl: Use correct return type for RSA_size
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Arne Schwabe <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35890.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#6) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by cron2, Code-Review+2 by plaisthos
Change subject: ssl_openssl: Use correct return type for RSA_size
......................................................................
ssl_openssl: Use correct return type for RSA_size
It returns int, so use that. Avoids a sign-compare warning.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35890.html
---
M src/openvpn/ssl_openssl.c
1 file changed, 2 insertions(+), 12 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/93/1493/6
src/openvpn/ssl_openssl.c +2 -12
@@ -1491,17 +1491,11 @@return len; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif -/* sign arbitrary data */ static int rsa_priv_enc (int flen,const unsigned char *from,unsigned char *to,RSA *rsa,int padding) { -unsigned int len =RSA_size (rsa); -int ret =-1 ; +int len =RSA_size (rsa);if (padding !=RSA_PKCS1_PADDING && padding !=RSA_NO_PADDING ) {
@@ -1509,15 +1503,11 @@return -1 ; } - ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding)); +int ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding));return (ret == len) ? ret :-1 ; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif -static int tls_ctx_use_external_rsa_key (struct tls_root_ctx *ctx,EVP_PKEY *pkey) {
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email )
Change subject: ssl_openssl: Use correct return type for RSA_size
......................................................................
ssl_openssl: Use correct return type for RSA_size
It returns int, so use that. Avoids a sign-compare warning.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1493
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg35890.html
---
M src/openvpn/ssl_openssl.c
1 file changed, 2 insertions(+), 12 deletions(-)
src/openvpn/ssl_openssl.c +2 -12
@@ -1491,17 +1491,11 @@return len; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wsign-compare" -#endif -/* sign arbitrary data */ static int rsa_priv_enc (int flen,const unsigned char *from,unsigned char *to,RSA *rsa,int padding) { -unsigned int len =RSA_size (rsa); -int ret =-1 ; +int len =RSA_size (rsa);if (padding !=RSA_PKCS1_PADDING && padding !=RSA_NO_PADDING ) {
@@ -1509,15 +1503,11 @@return -1 ; } - ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding)); +int ret =get_sig_from_man (from, flen, to, len,get_rsa_padding_name (padding));return (ret == len) ? ret :-1 ; } -#if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic pop -#endif -static int tls_ctx_use_external_rsa_key (struct tls_root_ctx *ctx,EVP_PKEY *pkey) {
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/1493?usp=email
To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: Ie8135a31b1f8f70ce0ddf63d7653f3d84a9e983f
Gerrit-Change-Number: 1493
Gerrit-PatchSet: 6
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: cron2 <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>